package cs4280.ass2.action;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cs4280.ass2.entity.Movie;
import cs4280.ass2.persistence.MovieDao;

public class UpcomingAction extends HttpServlet {
	private static final long serialVersionUID = 1L;

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		List<Movie> movieList = MovieDao.getInstance().retrieveAllUpcomingMovie();
		req.setAttribute("movieList", movieList);
		getServletContext().getRequestDispatcher("/upcoming.jsp").forward(req, resp);
	}

}
